package com.culture.bootdemo.controller;

import com.culture.bootdemo.common.basevo.Result;
import com.culture.bootdemo.model.req.BalanceReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author wen
 * @date 2019/10/29 16:10
 * @Description  文档api地址：http://localhost/bootDemo/doc.html
 **/
@RestController
@RequestMapping("/test")
@Api(tags = "swagger测试相关接口")
public class SwaggerController {

    @ApiOperation("testsssssss")
    @PostMapping(value = "/addExamRule")
    public Result test(@RequestBody BalanceReq params) {
        BalanceReq balance = null;
        return Result.builder().data(1).build();
    }

    @ApiOperation(value = "获取用户详细信息", notes = "根据id来获取用户详细信息")
    @RequestMapping(value = "/eee",method = RequestMethod.GET)
    @ApiImplicitParam(name = "id", value = "用户ID", required = true, dataType = "Integer")
    public Result ffff(Integer id) {

        return Result.builder().data(1).build();
    }
}
